/*
package com.lzy.config;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.profile.DefaultProfile;
import com.lzy.content.AliyunContentDetect;
import com.lzy.properties.AliyunContentProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

*/
/**
 * 阿里云内容检测配置
 *
 * @author lzy
 *//*

@Configuration
@EnableConfigurationProperties({AliyunContentProperties.class})
@ConditionalOnProperty(name = "cn.lzy.sdk.aliyun.content.enabled")
public class AliyunContentAutoConfiguration {


    @Configuration
    @ConditionalOnProperty(name = "cn.lzy.sdk.aliyun.content.enabled", havingValue = "true")
    public static class AliyunContentManage {
        @Bean
        @ConditionalOnMissingBean
        public DefaultAcsClient getDefaultAcsClient(DefaultProfile profile) {
            return new DefaultAcsClient(profile);
        }

        @Bean
        @ConditionalOnMissingBean
        public DefaultProfile getDefaultProfile(AliyunContentProperties properties) {
            return DefaultProfile.getProfile(properties.getRegionId(), properties.getAccessKeyId(), properties.getAccessKeySecret());
        }

        @Bean
        @ConditionalOnMissingBean
        public AliyunContentDetect getAliyunContentDetect(DefaultAcsClient client, DefaultProfile profile) {
            return new AliyunContentDetect(client, profile);
        }

    }


}
*/
